<?php
namespace app\user\controller;

use app\common\controller\UserBase;
use app\user\model\Shop as ShopModel;

class Shop extends UserBase
{
    public function index()
    {
        if ($this->request->isPost()) {
            $param = $this->request->param();
            //更新数据
            $resule = ShopModel::update($param,['id'=> ShopId()]);
            if ( $resule == true) {
                insert_user_log('修改了系统信息');
                $this->success('修改成功');
            } else {
                $this->error($this->errorMsg);
            }
        }
        $data = ShopModel::where('id', ShopId())->find();
        return $this->fetch('index', ['data' => $data]);
    }
    
}
